@import "../common/vars.scss";
@import "../mixins/mixins.scss";
@include create(tree) {
    position: relative;
    cursor: default;
    background: $color-white;
    color: $tree-font-color;
  
    @include e(empty-block) {
      position: relative;
      min-height: 60px;
      text-align: center;
      width: 100%;
      height: 100%;
    }
  
    @include e(empty-text) {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      color: $color-text-secondary;
    }
  
    @include e(drop-indicator) {
      position: absolute;
      left: 0;
      right: 0;
      height: 1px;
      background-color: $color-primary;
    }
  }
  
  @include create(tree-node) {
    white-space: nowrap;
    outline: none;
    &:focus { /* focus */
      > .aiui-tree-node-content {
        background-color: $tree-node-hover-background-color;
      }
    }
  
    @include when(drop-inner) {
      > .aiui-tree-node-content .aiui-tree-node-label {
        background-color: $color-primary;
        color: #fff;
      }
    }
  
    @include e(content) {
      display: flex;
      align-items: center;
      height: 26px;
      cursor: pointer;
  
      & > .aiui-tree-node-expand-icon {
        padding: 6px;
      }
      & > label.aiui-checkbox {
        margin-right: 4px;
      }
      &:hover {
        background-color: $tree-node-hover-background-color;
      }
  
      .aiui-tree.is-dragging & {
        cursor: move;
  
        & * {
          pointer-events: none;
        }
      }
  
      .aiui-tree.is-dragging.is-drop-not-allow & {
        cursor: not-allowed;
      }
    }
  
    @include e(expand-icon) {
      cursor: pointer;
      color: $tree-expand-icon-color;
      font-size: 12px;
  
      transform: rotate(0deg);
      transition: transform 0.3s ease-in-out;
  
      &.expanded {
        transform: rotate(90deg);
      }
  
      &.is-leaf {
        color: transparent;
        cursor: default;
      }
    }
  
    @include e(label) {
      font-size: $font-size-base;
    }
  
    @include e(loading-icon) {
      margin-right: 8px;
      font-size: $font-size-base;
      color: $tree-expand-icon-color;
    }
  
    & > .aiui-tree-node-children {
      overflow: hidden;
      background-color: transparent;
    }
  
    &.is-expanded > .aiui-tree-node-children {
      display: block;
    }
  }
  
  .aiui-tree-highlight-current .aiui-tree-node.is-current > .aiui-tree-node-content {
    background-color: mix($color-white, $color-primary, 92%);
  }
  